package basicas;

import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.ManyToAny;

@Entity
public class PrestadoraDeServicos extends Empresa  implements Cloneable{

	@ManyToMany(fetch = FetchType.LAZY, cascade = { CascadeType.ALL })
	@JoinTable(name = "Prestadora_Servicos", joinColumns = { @JoinColumn(name = "idPrestadoraDeServico") }, inverseJoinColumns = { @JoinColumn(name = "idTipoDeServico") })
	private Collection<TipoDeServico> TipoDeServicos;

	public PrestadoraDeServicos(Collection<TipoDeServico> tipoDeServicos) {
		super();
		TipoDeServicos = tipoDeServicos;
	}


	public PrestadoraDeServicos() {
		super();
	}



	public Collection<TipoDeServico> getTipoDeServicos() {
		return TipoDeServicos;
	}

	public void setTipoDeServicos(Collection<TipoDeServico> tipoDeServicos) {
		TipoDeServicos = tipoDeServicos;
	}

}
